home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HTBasic 9.3
/
HTBasic 9.3.iso
/
FLOPPY
/
61WIN
/
disk1
/
data1.cab
/
Help_Files
/
serial.txt
Wrap
Text File
|
2001-03-02
|
5KB
|
137 lines
READIO/WRITEIO Registers
The following tables document the READIO and WRITEIO registers available with
the Serial drivers. The 16-bit or 32-bit Windows Programmer's Reference
books or CD-ROM's are essential for understanding these functions.
HTBasic/Windows SERIAL READIO/WRITEIO Registers
Reg. Windows Description
no. element
---- ---------------------------- -----------------------
1 DCB.BaudRate baud rate
2 *(USHORT *)(&DCB+12) [16-bit] flags
&h 0001 fBinary
&h 0002 fRtsDisable
&h 0004 fParity
&h 0008 fOutXCtsFlow
&h 0010 fOutxDsrFlow
&h 0060 unused
&h 0080 fDtrDisable
&h 0100 fOutX
&h 0200 fInX
&h 0400 fPeChar
&h 0800 fNull
&h 1000 fChEvt
&h 2000 fDtrFlow
&h 4000 fRtsFlow
&h 8000 unused
*(USHORT *)(&DCB+8) [32-bit] flags
&h 0001 fBinary
&h 0002 fParity
&h 0004 fOutxCtsFlow
&h 0008 fOutxDsrFlow
&h 0030 fDtrControl
0000 DTR_CONTROL_DISABLE
0010 DTR_CONTROL_ENABLE
0020 DTR_CONTROL_HANDSHAKE
&h 0040 fDsrSensitivity
&h 0080 fTXContinueXonXoff
&h 0100 fOutX
&h 0200 fInX
&h 0400 fErrorChar
&h 0800 fNull
&h 3000 fRtsControl
0000 RTS_CONTROL_DISABLE
1000 RTS_CONTROL_ENABLE
2000 RTS_CONTROL_HANDSHAKE
3000 RTS_CONTROL_TOGGLE
&h 4000 fAbortOnError
5 DCB.XonLim XON limit
6 DCB.XoffLim XOFF limit
7 DCB.ByteSize bytes/char.
8 DCB.Parity parity
&h 00 NOPARITY
&h 01 MARKPARITY
&h 02 EVENPARITY
&h 03 ODDPARITY
&h 04 SPACEPARITY
9 DCB.StopBits stop bits
&h 00 ONESTOPBIT
&h 01 ONE5STOPBITS
&h 02 TWOSTOPBITS
10 DCB.XonChar XON char.
11 DCB.XoffChar XOFF char.
12 DCB.PeChar [16-bit] error replacement char.
DCB.ErrorChar [32-bit]
13 DCB.EofChar EOF char.
14 DCB.EvtChar received event char.
15 DCB.RlsTimeout [16-bit] RLS timeout
0 [32-bit]
16 DCB.CtsTimeout [16-bit] CTS timeout
0 [32-bit]
17 DCB.DsrTimeout [16-bit] DSR timeout
0 [32-bit]
HTBasic/Windows SERIAL WRITEIO Only Register
Reg. Windows Description
no. element
---- ---------------------------- -----------------------
20 fdwFunction EscapeCommFunction() arg.
1 SETXOFF
2 SETXON
3 SETRTS
4 CLRRTS
5 SETDTR
6 CLRDTR
HTBasic/Windows SERIAL READIO Only Registers
Reg. Windows Description
no. element
---- ---------------------------- -----------------------
30 COMSTAT.status buffer status
COMSTAT.status, lower 16 bits [32-bit]
&h 0001 fCtsHold
&h 0002 fDsrHold
&h 0004 fRlsdHold
&h 0008 fXoffHold
&h 0010 fXoffSent
&h 0020 fEof
&h 0040 fTxim
31 CMSTAT.cbInQue input buffer # chars.
32 COMSTAT.cbOutQue output buffer # chars.
33 Errors output of ClearCommError().
&H 0001 CE_RXOVER Receive Queue overflow
&h 0002 CE_OVERRUN Receive Overrun Error
&h 0004 CE_RXPARIT Receive Parity Error
&h 0008 CE_FRAME Receive Framing error
&h 0010 CE_BREAK Break Detected
&h 0100 CE_TXFULL TX Queue is full
&h 8000 CE_MODE Mode unsupported
40 ModemStats [32-bit only] GetCommModemStats() arg.
&h 0010 MS_CTS_ON
&h 0020 MS_DSR_ON
&h 0040 MS_RING_ON
&h 0080 MS_RLSD_ON